//
//  MySegView.m
//  项目PianKe
//
//  Created by 关雷 on 14-12-29.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MySegView.h"

@implementation MySegView

- (void)dealloc
{
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame imgName:(NSString *)imgName title:(NSString *)title
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imgV = [[UIImageView alloc] initWithFrame:CGRectMake(0, frame.size.height / 4 - 2, frame.size.width / 2 - 5, frame.size.height / 2 + 3)];
        _imgV.image = [UIImage imageNamed:imgName];
        [self addSubview:_imgV];
        [_imgV release];
        
        self.lable = [[UILabel alloc] initWithFrame:CGRectMake(frame.size.width / 2 - 10, frame.size.height / 4, frame.size.width / 2 + 15, frame.size.height / 2)];
        [_lable setText:title];
        UIColor * color = [UIColor colorWithRed:45 / 255.0 green:91 / 255.0 blue:255 / 255.0 alpha:1];
        _lable.highlightedTextColor = color;
        
        [_lable setTextAlignment:NSTextAlignmentCenter];
        [self addSubview:_lable];
        [_lable release];

    }
    return self;
}

@end
